updating oE mem_set
mem_set
<built-in> procedure mem_set(atom destination, integer byte_value, integer how_many))
sets a contiguous range of memory locations to a single value.
Parameters:
- destination : an atom, the address starting the range to set.
- byte_value : an integer, the value to copy at all addresses in the range.
- how_many : an integer, how many bytes are to be set.
Comments:
The low order 8 bits of byte_value are actually stored in each byte. mem_set(destination, byte_value, how_many) is equivalent to: poke(destination, repeat(byte_value, how_many)) but is much faster.
Example 1:
destination = allocate(1000) mem_set(destination, ' ', 1000) -- 1000 consecutive bytes in memory will be set to 32 -- (the ASCII code for ' ')
See Also:
Not Categorized, Please Help
|